const fs = require("fs-extra");
const { resolve } = require("./utils");
run();
function run() {
  fs.ensureDirSync(resolve("temp"));
  const js = 'const structs = require("../dist");\n';
  fs.writeFileSync(resolve("temp/index.js"), js);
  const ts = 'import * as structs from "../src";\n';
  fs.writeFileSync(resolve("temp/index.ts"), ts);
  const tsconfig =
    '{"extends": "../tsconfig.json","compilerOptions": {"module": "CommonJs"}}\n';
  fs.writeFileSync(resolve("temp/tsconfig.json"), tsconfig);
}
